#pragma once


namespace iPod
{

struct Song
{
    std::string title;
    std::string artist;
    int         size;

    Song( void ) {
    }

    Song & operator=( const Song & song ) {
        this->title  = song.title;
        this->artist = song.artist;
        this->size   = song.size;

        return *this;
    }
};

static Song *       songs = NULL;
static unsigned int count = 0;

//===========================================================================
// initialize your ipod by reading the input files, check if the file exists,
// prompt the welcome window to users unless the user choose to exit, call
// the right functions when users make choices.
//===========================================================================    
void initialize( void );

//===========================================================================
// shows the songs in the current playlist
//===========================================================================    
void show_playlist( void );

//===========================================================================
// delete a song when the title is given. Report error if the title cannot be
// found. When a song is deleted, other songs may need to be shifted
// accordingly and the dynamic array size change as well.
//===========================================================================
void remove_a_song( void );

//===========================================================================
// delete all songs from the ipod and free the memory space
//===========================================================================
void cleanup( void );

//===========================================================================
// shuffle the songs in the playlist with a random order. Should not show
// repeated order when calling this function multiple times.
//===========================================================================
void shuffle( void );

//===========================================================================
// exit the program
//===========================================================================
void exit( void );

//===========================================================================
// find a song
//===========================================================================
int find_a_song( const char * title );

//===========================================================================
// display a song
//===========================================================================
void display( Song & song );

}; // end of namespace iPod